<?php //strip
/**
 * Implementation of the form for a single catalog item.
 * 
 * @package odCatalogWpPlugin
 * @subpackage odCatalogWpPlugin_Forms
 * @author Ondrej Donek <ondrejd@gmail.com>
 */
class odCatalogWpPlugin_Forms_Item extends odWpPlugin_Form
{
	public function __construct()
	{
		$model = new odCatalogWpPlugin_Models_Category();
		$this->mName = 'catalog_category_form';
		$this->mDescription = '';
		$this->mFields = array(
			'ID' => array(
				'type' => self::TYPE_HIDDEN,
				'label' => null
			),
			'urlid' => array(
				'type' => self::TYPE_TEXT, 
				'label' => __('URLID:', odCatalogWpPlugin::TEXTDOMAIN),
				'required' => true
			),
			'title' => array(
				'type' => self::TYPE_TEXT, 
				'label' => __('Název:', odCatalogWpPlugin::TEXTDOMAIN),
				'required' => true
			),
			'advised' => array(
				'type' => self::TYPE_CHECKBOX,
				'label' => __('Je doporučováno:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			// TODO Logo (TYPE_FILE)!!!!
			'description' => array(
				'type' => self::TYPE_TEXTAREA,
				'label' => __('Popis:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'card1_discount' => array(
				'type' => self::TYPE_TEXT,
				'label' => __('Sleva u karty CLASSIC:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'card2_discount' => array(
				'type' => self::TYPE_TEXT,
				'label' => __('Sleva u karty GOLD:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'card3_discount' => array(
				'type' => self::TYPE_TEXT,
				'label' => __('Sleva u karty PLATINUM:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			// TODO `prices`!!!
			'open_hours' => array(
				'type' => self::TYPE_TEXT,
				'label' => __('Otevírací doba:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'cooking_after_23' => array(
				'type' => self::TYPE_CHECKBOX,
				'label' => __('Kuchyně i po 23 hod:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'lang_spoken' => array(
				'type' => self::TYPE_TEXT,
				'label' => __('Jazyky:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'transport' => array(
				'type' => self::TYPE_TEXT,
				'label' => __('Nejbližší doprava:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'delivery' => array(
				'type' => self::TYPE_CHECKBOX,
				'label' => __('Rozvoz:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'wifi' => array(
				'type' => self::TYPE_CHECKBOX,
				'label' => __('Free Wi-Fi:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			// TODO `credit_cards`!!!
			'email1' => array(
				'type' => self::TYPE_TEXT,
				'label' => __('Email:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'email2' => array(
				'type' => self::TYPE_TEXT,
				'label' => __('Email:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'website' => array(
				'type' => self::TYPE_TEXT,
				'label' => __('Internet:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			// TODO `address_ID`!!!
			// TODO `gallery_ID`!!!
			'adminfield_publish' => array(
				'type' => self::TYPE_CHECKBOX,
				'label' => __('Publikovat:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'adminfield_featured' => array(
				'type' => self::TYPE_CHECKBOX,
				'label' => __('Přednostně uváděný:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			// TODO `adminfield_access`!!!
			// TODO `adminfield_author`!!!
			'adminfield_locale' => array(
				'type' => self::TYPE_SELECT,
				'label' => __('Jazyková verze:', odCatalogWpPlugin::TEXTDOMAIN),
				'options' => array(
					'en' => __('Anglická', odCatalogWpPlugin::TEXTDOMAIN),
					'cs' => __('Česká', odCatalogWpPlugin::TEXTDOMAIN)
				),
				'required' => true, 
				'default' => 'en'
			),
			'adminfield_starton' => array(
				'type' => self::TYPE_TEXT,
				'label' => __('Publikovat od:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'adminfield_endon' => array(
				'type' => self::TYPE_TEXT,
				'label' => __('Publikovat do:', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'meta_description' => array(
				'type' => self::TYPE_TEXT,
				'label' => __('Popis (META):', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'meta_keywords' => array(
				'type' => self::TYPE_TEXT,
				'label' => __('Klíčová slova (META):', odCatalogWpPlugin::TEXTDOMAIN)
			),
			'deleted' => array(
				'type' => self::TYPE_CHECKBOX,
				'label' => __('Smazáno:', odCatalogWpPlugin::TEXTDOMAIN)
			)
		);
		$this->mDecorator = self::DECORATOR_TABLE;
	}
} // End of odCatalogWpPlugin_Forms_Item
